/**
 *  @Author MJreams
 *  @Time 2021/12/7 10:18:00
 *
**/

package errmsg

const (
	SUCC  = 200
	ERROR = 500

	// 登陆模块的错误信息
	ERROR_PASSWORD_WRONG   = 142
	USERNAME_LOGIN_SUCC    = 55
	ERROR_USER_NOT_EXIST   = 94
	//ERROT_TOKEN_EXIST      = 1004
	//ERROT_TOKEN_RUNTIME    = 1005
	//ERROT_TOKEN_WRONG      = 1006
	//ERROR_TOKEN_TYPE_WRONG = 1007
	//ERROR_USER_lIST        = 1008
	//ERROR_PARMENTS         = 1009
	// code = 2000 文章模块的错误

	// code = 3000 分类模块的错误
)

var codeMsg = map[int64]string{
	SUCC:                   "OK",
	ERROR:                  "FAIL",
	ERROR_PASSWORD_WRONG:   "密码错误！如您忘记密码，请联系学院秘书进行密码重置。",
	USERNAME_LOGIN_SUCC:    "登陆成功",
	ERROR_USER_NOT_EXIST:   "请输入正确的用户名！",
	//ERROT_TOKEN_EXIST:      "TOKEN不存在！",
	//ERROT_TOKEN_RUNTIME:    "TOKEN已过期！",
	//ERROT_TOKEN_WRONG:      "TOKEN不正确！",
	//ERROR_TOKEN_TYPE_WRONG: "TOKEN 格式错误！",
	//ERROR_USER_lIST:        "用户列表为空",
	//ERROR_PARMENTS:         "参数错误",
}

func GetErrorMsg(code int64) string {
	return codeMsg[code]
}
